package com.hue.springcloud.controller;

import com.hue.springcloud.CommonResult;
import com.hue.springcloud.service.AccountService;
import com.hue.springcloud.service.OrderService;
import com.hue.springcloud.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {
    @Autowired
    private OrderService orderService;

    //创建订单
    @GetMapping("/order/create")
    public CommonResult create(){
//        try {
            orderService.createOrder();
            return new CommonResult(200,"支付成功");
//        }catch (Exception e){
//            System.out.println(e.getMessage());
//        }
//        return new CommonResult(444,"交易失败");
    }
}
